#include <stdio.h>
#include <string.h>

#include "simple_uart.h"




int main(void) {
    char sbuf[100], rbuf[100];
    unsigned int len;
    if(simple_uart_init("/dev/ttyS5", 115200)) {
        return -1;
    }
    while(1) {
        simple_uart_send("hello\r\n", strlen("hello\r\n") );
        len = simple_uart_rec(rbuf, 100);
        if(len > 0) {
            rbuf[len] = 0;
            printf("rec: %s\r\n", rbuf);
        }
        sleep(1);
    }
    return 0;
}

